import json

import config


class ReadJson:

    # 封装读取json文件工具
    @classmethod
    def read_json(cls, file_name):
        with open(file=file_name, mode="r", encoding="utf-8") as f:
            data = json.load(f)
            my_list = []
            for item in data:
                temp = tuple(item.values())
                my_list.append(temp)

            # print(my_list)
            return my_list


if __name__ == '__main__':
    file_name = config.BASE_DIR + "/data/register_data.json"
    ReadJson.read_json(file_name)
